package com.lcx.movie.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lcx.movie.mapper.SeatsMapper;
import com.lcx.movie.entity.Seats;
import com.lcx.movie.service.SeatsService;
/** 
 * @Description  座位实现类
 * @version 1.0 
 * @author lcx
 * @date 2025/2/9 11:25
 */
@Service
public class SeatsServiceImpl extends ServiceImpl<SeatsMapper, Seats> implements SeatsService{
    @Autowired
    private SeatsMapper seatsMapper;
    /**
     * 根据影厅id查询所有的座位
     * @param hallId 影厅id
     * @return 座位集合
     */
    @Override
    public List<Seats> selectSeatsByHallId(Integer hallId) {
        return seatsMapper.selectSeatsByHallId(hallId);
    }

    /**
     * 修改座位信息
     * @param list 集合
     * @return 受影响的行数
     */
    @Override
    public int updateSeats(List<String> list) {
        return seatsMapper.updateSeats(list);
    }

    @Override
    public int getSeatsByHallId(int hallId) {
        return seatsMapper.getSeatsByHallId(hallId);
    }
}
